package org.example;

public class 第七章_循环 {

    public static void main(String[] args) {
        int i[] = {1,2,3,4,5,6,7,8,9,10};
        //for
        System.out.println("for:");
        for (int i1 : i) {
            System.out.println(i1);
        }
        //while
        System.out.println("while:");
        int u = 0;
        while (u<i.length){
            System.out.println(i[u]);
            u++;
        }
        //do…while
        System.out.println("do…while:");
        u = 0;
        do {
            System.out.println(i[u]);
            u++;
        }while (u<i.length);
    }

}
